package cn.xspace.chatui.bean;

import com.xspace.android.xafcommon.util.LogUtil;

import cn.xspace.library.util.OkHttpManager;

/**
 * Created by liuchen on 2016/10/13.
 */

public class MsgRecordEntity extends MessageEntity {
    private static final String TAG = "MsgRecordEntity";
    public String msg_id = "";
    public String is_mine = "";


    public ChatFileEntity mFileEntity = new ChatFileEntity();

    public void message2Record(MessageEntity entity) {
        this.msg_type = entity.msg_type;
        this.msg_logo = entity.msg_logo;
        this.msg_sender_id = entity.msg_sender_id;
        this.msg_sender_name = entity.msg_sender_name;
        this.msg_receiver_id = entity.msg_receiver_id;
        this.msg_receiver_name = entity.msg_receiver_name;
        this.msg_unread_count = entity.msg_unread_count;
        this.msg_warn_status = entity.msg_warn_status;
        this.msg_last_time = entity.msg_last_time;
        this.msg_content_type = entity.msg_content_type;
        this.msg_content = entity.msg_content;
        this.msg_send_status = entity.msg_send_status;
        this.msg_group_id = entity.msg_group_id;
        this.msg_group_name = entity.msg_group_name;
        this.msg_index = entity.msg_index;
        this.isRead = entity.isRead;
    }

    private OkHttpManager.DataCallBack mCallback;

    public OkHttpManager.DataCallBack getmCallback() {
        return mCallback;
    }

    public void setStatusCallback(OkHttpManager.DataCallBack mCallback) {
        LogUtil.d(TAG, "setStatusCallbacks");
        this.mCallback = mCallback;
    }

    @Override
    public String toString() {

        return super.toString() +
                "MsgRecordEntity{" +
                "msg_id='" + msg_id + '\'' +
                ", tip_type='" + tip_type + '\'' +
                ", is_mine='" + is_mine + '\'' +
                ", mFileEntity=" + mFileEntity +
                ", mCallback=" + mCallback +
                '}';
    }
}

//    public MsgRecordEntity getRecordByMsgEntity(MessageEntity entity) {
//
//    }
//}
